package com.hebeu.gfh.mapper;

import com.hebeu.gfh.pojo.po.TextVote;
import com.hebeu.gfh.pojo.po.voteResult;
import com.hebeu.gfh.pojo.vo.voteInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author: 刘剑利
 * @Version: v1.0
 */
@ResponseBody
@Mapper
public interface TextVoteMapper {
    public void initTextVote(TextVote textVote);

    public List<TextVote> getVoteList(@Param("userId") int userId);

    public void deleteVote(int voteId);

    public TextVote findVoteInfoByvid(int vid);

    public void updateVoteInfo(TextVote textVote);

    public int voteResult(@Param("voteId") int voteId, @Param("index") int index);

    public int voteSelected(@Param("voteId") int voteId, @Param("index") int index, @Param("userId") int userId);

    public void castVote(voteResult voteResult);

    public int voteSelected1(@Param("voteId") int voteId,@Param("userId") int userId);

    public List<voteInfo> getVoteByuserId(int userId);
}
